<?php
/* --------------------------------------------------------------
   gm_pdf_fonts.php 2008-08-07 gambio
   Gambio OHG
   http://www.gambio.de
   Copyright (c) 2008 Gambio OHG
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------
*/
	defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
	<tr>
		<td valign="top" align="left" class="main">
			<b><?php echo MENU_TITLE_FONTS; ?></b>
		</td>
	</tr>
</table>
<br />
<form id="gm_pdf_form">
	<table border="0" width="600" cellspacing="0" cellpadding="2">
		
		<?php $i = 0; while ($i < count($boxes)) {?>
		
		<tr>
			<td valign="top" align="left" class="main" width="200">
				<?php echo constant(str_replace('GM_PDF_', 'GM_PDF_TITLE_',$boxes[$i])); ?>
			</td>
			<td valign="top" align="right" class="main">
				
				<select onChange="gm_hide_boxes('gm_color_box');gm_fadeout_boxes('gm_status');" style="width:100px;" id="<?php echo $boxes[$i]; ?>">																		
					<option selected value="<?php echo $gm_values[$boxes[$i]]; ?>"><?php echo $gm_values[$boxes[$i]]; ?></option>
					<option value="courier">courier</option>
					<option value="helvetica">helvetica</option>
					<option value="times">times</option>
				</select>
				
				<select onChange="gm_hide_boxes('gm_color_box');gm_fadeout_boxes('gm_status');" style="width:120px;" id="<?php echo $boxes[$i+1]; ?>">																		
					<option selected value="<?php echo $gm_values[$boxes[$i+1]]; ?>"><?php echo constant('SELECT_FONT_STYLE_' . strtoupper($gm_values[$boxes[$i+1]])); ?></option>
					<?php	if($gm_values[$boxes[$i+1]] != 'b') { ?>
					<option value="b"><?php echo SELECT_FONT_STYLE_B; ?></option>	
					<?php } 
							if($gm_values[$boxes[$i+1]] != 'i') { 
					?>
					<option value="i"><?php echo SELECT_FONT_STYLE_I ?></option>
					<?php } 
							if($gm_values[$boxes[$i+1]] != 'u') { 
					?>
					<option value="u"><?php echo SELECT_FONT_STYLE_U; ?></option>
					<?php } 
							if($gm_values[$boxes[$i+1]] != '') { 
					?>
					<option value=""><?php echo SELECT_FONT_STYLE_; ?></option>
					<?php } ?>
				</select>

				<select onChange="gm_hide_boxes('gm_color_box');gm_fadeout_boxes('gm_status');" style="width:60px;" id="<?php echo $boxes[$i+2]; ?>">																		
					<option selected value="<?php echo $gm_values[$boxes[$i+2]]; ?>"><?php echo $gm_values[$boxes[$i+2]]; ?></option>
					<option value="7">7</option>
					<option value="8">8</option>
					<option value="9">9</option>
					<option value="10">10</option>
					<option value="11">11</option>
					<option value="12">12</option>
					<option value="13">13</option>
					<option value="14">14</option>
					<option value="15">15</option>
					<option value="16">16</option>
					<option value="17">17</option>
				</select>

				<input onblur="gm_update_color('<?php echo $boxes[$i+3]; ?>');" onclick="gm_fadeout_boxes('gm_status');" type="text" maxlength="7" style="width:60px;" value="<?php echo $gm_values[$boxes[$i+3]]; ?>" id="<?php echo $boxes[$i+3]; ?>">
				<input style="cursor:pointer;background-color:<?php echo $gm_values[$boxes[$i+3]]; ?>" type="button" style="width:20px;" onclick="gm_hide_boxes('gm_color_box');gm_fadeout_boxes('gm_status');" id="<?php echo $boxes[$i+3]; ?>_PICKER">
			</td>
		</tr>
		<?php 
		 $i = $i+4;	
		}
		?>
		<tr>
			<td valign="top" align="left" class="main" width="200">
				<?php echo constant(str_replace('GM_PDF_', 'GM_PDF_TITLE_', 'GM_PDF_DRAW_COLOR')); ?>
			</td>
			<td colspan="2" valign="bottom" align="right" class="main">
				<input onblur="gm_update_color('<?php echo 'GM_PDF_DRAW_COLOR'; ?>');" onclick="gm_fadeout_boxes('gm_status');" type="text" maxlength="7" style="width:60px;" value="<?php echo $gm_draw_color; ?>" id="GM_PDF_DRAW_COLOR">
				<input style="cursor:pointer;background-color:<?php echo $gm_draw_color; ?>" type="button" style="width:20px;" onclick="gm_hide_boxes('gm_color_box');gm_fadeout_boxes('gm_status');" id="GM_PDF_DRAW_COLOR_PICKER">
			</td>
		</tr>
		<tr>
			<td valign="middle" align="left" class="main">		
				&nbsp;
			</td>
			<td valign="middle" align="left" class="main">
				&nbsp;
			</td>
		</tr>
		<tr>
			<td valign="middle" align="left" class="main">				
				<input class="button" type="button" value="<?php echo BUTTON_SAVE;?>" onclick="gm_fadeout_boxes('gm_status');gm_update_boxes('<?php echo xtc_href_link('gm_pdf_action.php', 'action=gm_pdf_update'); ?>', 'gm_status')">																									 
			</td>
			<td valign="middle" align="left" class="main">				
				<span id="gm_status" style="height:20px"></span>																									 
			</td>
		</tr>
	</table>
</form>